﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<CarHelpDesk.Web.Models.Tag>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Редакция на етикети
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Редакция на етикети</h2>
    <br />
    
    <h3>Списък:</h3>

    <table>
        <tr>
            <th>ID</th>
            <th>
                Заглавие
            </th>
            <th>
                Връзки
            </th>
            <th>
                Създаден от
            </th>
            <th>
                Създаден на
            </th>
            <th></th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%= Html.Encode(item.ID) %>
            </td>
            <td>
                <a href="../../Questions/IndexTag/<%= Html.Encode(item.Title) %>" >
                <%= Html.Encode(item.Title) %></a>
            </td>
            <td>
                <%= Html.Encode(item.QuestionTags.Count()) %>
            </td>
            <td>
                <%= Html.Encode(item.aspnet_User.UserName) %>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:g}", item.CreateDate)) %>
            </td>
            <td>
                <%= Html.ActionLink("Изтрий", "Delete", new { id = item.ID })%>
            </td>
        </tr>
    
    <% } %>

    </table>
    <br />
    <p>
        <%= Html.ActionLink("Създай нов", "Create") %>
    </p>

</asp:Content>

